<?php include('scripts.php'); ?>

<script type="text/javascript">
$(function() {
    var container = $('div.errorContainer');
    $("#contactUsForm").validate({
        errorLabelContainer: $("ol", container),
        errorContainer: $('div.errorContainer'),
        wrapper: 'li',
        meta: "validate",
        messages : {
            contactname: {
                required: "<?php echo __('%1% is required.', array('%1%' => 'Full name')) ?>"
            },
            email: {
                required: "<?php echo __('%1% is required.', array('%1%' => 'Email address')) ?>"
            },
            enquiry: {
                required: "<?php echo __('%1% is required.', array('%1%' => 'Message')) ?>"
            }
        },
        rules : {
            "contactname" : {
                required : true
            },
            "email" : {
                required : true
                , email: true
            },
            "enquiry" : {
                required : true
            }
        },
        submitHandler: function(form) {
            form.submit();
        }
    });
    $("#validate-close").click(function(){
        $(container).hide(500);
    });
});
</script>

<div style="z-index: 999; position: fixed; top:0px; right:0px;" class="errorContainer ui-state-error-validate ui-corner-all container ui-widget" id="validateContainer">
    <p>
        <span style="float: left; margin-right: .3em;" class="ui-red ui-icon ui-icon-alert"></span>
        <a href="#" id="validate-close" role="button" class="ui-dialog-titlebar-close ui-corner-all">
            <span style="position:absolute; right : -2px; margin-right: .3em; border: 1px solid #FBCB09; color: #C77405;" class="ui-icon ui-icon-closethick"></span>
        </a>
        <strong id='_msg'>
            <ol style="padding-top:0px;margin-top:0px;margin-bottom:0px"></ol>
        </strong>
    </p>
</div>

<div id="content">
    <!-- ========== CATEGORIES TABS ========= -->
    <!-- ==================================== -->
    <table id="contentMainWrapper" border="0" cellpadding="0" cellspacing="0" width="100%">
        <tbody>
        <tr>
            <td id="column-left" style="width: 215px;">
                <div style="width:215px;">
                    <!--// bof: categories //-->
                    <div class="box" id="categories" style="width:215px;">
                        <div class="box-border">
                            <div class="box-head">
                                <?php echo __('Categories') ?>
                            </div>
                            <div class="box-body">
                                <?php include_component('component', 'categoriesSideMenu') ?>
                            </div>
                        </div>
                    </div>
                    <!--// eof: categories //-->
                    <!--// bof: specials //-->
                    <div class="box" id="specials" style="width:215px;">
                        <div class="box-border">
                            <div class="box-head">
                                <a href="<?php echo url_for("/product/specialItem") ?>"><?php echo __('Specials') ?></a>
                            </div>
                            <div class="box-body">
                                <?php include_component('component', 'specialsSideMenu', array('param' => 'will implement for categoryType')) ?>
                            </div>

                        </div>
                    </div>
                    <!--// eof: specials //-->
                </div>
            </td>
            <td id="column-center" valign="top">
                <div class="column-center-padding">
                    <div id="contactUsDefault" class="centerColumn">

                        <form method="post" action="/contactUs/index" name="contactUsForm" id="contactUsForm">
                                <address>Customer Service: <?php echo $customerService->getValue() ?>
                                <br><?php echo $customerAddress->getValue() ?>
<!--                                <br>--><?php //echo str_replace("\n", "<br>", $customerAddress->getValue()); ?>
                                </address>
                                <br>

                            Your message has been successfully sent.

                            <br>
                            <div class="buttonRow">
                                <button>Back</button>
                            </div>
                        </form>
                    </div>
                    <div class="clear"></div>
                    <!--eof content_center-->
                </div>

            </td>
        </tr>
        </tbody>
    </table>
</div>